package com.vitas.coin.ui.dialog;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.vitas.coin.databinding.DialogApplyPermissionPromptBinding;

public class TipDlg extends BaseDialogFragment {
    DialogApplyPermissionPromptBinding binding;
    String msg = "";

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        binding = DialogApplyPermissionPromptBinding.inflate(inflater, container, false);
        binding.tvContent.setText(msg);
        binding.llConfirm.setOnClickListener(v -> dismiss(true, null));
        binding.space.setVisibility(View.VISIBLE);
        binding.cancel.setVisibility(View.VISIBLE);
        binding.cancel.setOnClickListener(v -> dismiss());
        return binding.getRoot();
    }

    public TipDlg setMsg(String s) {
        msg = s;
        return this;
    }
}
